#pragma once
#include "matrix.h"

class Shader;
class Model;
class Texture;

class Object
{
private:
	Vector3 m_position, m_rotation, m_scale;
	Texture* m_texture;
	Model* m_model;
	Shader* m_shader;
	Matrix m_worldMatrix;
	char m_id[MAX];

public:
	Object(void);
	virtual ~Object(void);
	void Init(const char* id, const Vector3 & pos, const Vector3 & rot, const Vector3 & sca, Texture* texture, Model* model, Shader* shader);
	void Draw(Matrix & vpMatrix);
	void Update();
	void Draw(Matrix & vpMatrix, Vector4 & color);

	// Setters
	void SetPosition(const Vector3 & pos);
	void SetRotation(const Vector3 & rot);
	void SetScale(const Vector3 & sca);
	void SetTexture(Texture *& texture);
	void SetModel(Model *& model);
	void SetShader(Shader *& shader);

	// Getters
	Vector3 & GetPosition();
	Vector3 & GetRotation();
	Vector3 & GetScale();
	Texture *& GetTexture();
	Model *& GetModel();
	Shader *& GetShader();
	const char* GetId();

private:
	void CalculateWorldMatrix();
};
